﻿using System.Collections.Generic;

namespace LH.Model.SA
{
    public class SaleOrder  //销售订单
    {
        public SaleOrder(SaleOrder.Head head, List<SaleOrder.Body> bodies)
        {
            this.head = head;
            this.bodies = bodies;
        }

        public Head head;
        public List<Body> bodies;
        public class Head       //销售订单表头
        {
            public string? editprop { get; set; }
            
            public string id { get; set; }
            //public string fstockquanO { get; set; }
            //public string fcanusequanO { get; set; }
            public string iverifystate { get; set; }
            public string ireturncount { get; set; }
            public string icreditstate { get; set; }
            public string iswfcontrolled { get; set; }
            public string dpredatebt { get; set; }
            public string dpremodatebt { get; set; }
            public string caddcode { get; set; }
            public string cdeliverunit { get; set; }
            public string ccontactname { get; set; }
            public string cofficephone { get; set; }
            public string cmobilephone { get; set; }
            public string csocode { get; set; }
            public string ddate { get; set; }
            public string cbustype { get; set; }
            public string cstname { get; set; }
            public string ccusabbname { get; set; }
            public string cpayname { get; set; }
            public string cdepname { get; set; }
            public string cpersonname { get; set; }
            public string itaxrate { get; set; }
            public string cexch_name { get; set; }
            public string iexchrate { get; set; }
            public string cmemo { get; set; }
            public string cmaker { get; set; }
            public string cverifier { get; set; }
            public string ccloser { get; set; }
            public string clocker { get; set; }
            public string breturnflag { get; set; }
            public string ivtid { get; set; }
            public string istatus { get; set; }
            public string ufts { get; set; }
            public string ccrechppass { get; set; }
            public string clowpricepass { get; set; }
            public string bcontinue { get; set; }
            public string isumx { get; set; }
            public string zdsum { get; set; }
            public string ccusname { get; set; }
            public string ccusphone { get; set; }
            public string cstcode { get; set; }
            public string csccode { get; set; }
            public string cpaycode { get; set; }
            public string cdepcode { get; set; }
            public string ccuscode { get; set; }
            public string ccusperson { get; set; }
            public string coppcode { get; set; }
            public string ccusaddress { get; set; }
            public string cpersoncode { get; set; }
            public string iarmoney { get; set; }
            public string ccusoaddress { get; set; }
            public string imoney { get; set; }
            public string cscname { get; set; }
            public string cchanger { get; set; }
            public string dcreatesystime { get; set; }
            public string dverifysystime { get; set; }
            public string dmodifysystime { get; set; }
            public string cmodifier { get; set; }
            public string dmoddate { get; set; }
            public string dverifydate { get; set; }
            public string cdefine16 { get; set; }
            public string ccrechpname { get; set; }
            public string ccusdefine1 { get; set; }
            public string ccusdefine2 { get; set; }
            public string ccusdefine3 { get; set; }
            public string ccusdefine4 { get; set; }
            public string zdsumdx { get; set; }
            public string isumdx { get; set; }
            public string ccusdefine5 { get; set; }
            public string ccusdefine6 { get; set; }
            public string ccusdefine7 { get; set; }
            public string ccusdefine8 { get; set; }
            public string ccusdefine9 { get; set; }
            public string ccusdefine10 { get; set; }
            public string ccusdefine11 { get; set; }
            public string ccusdefine12 { get; set; }
            public string ccusdefine13 { get; set; }
            public string ccusdefine14 { get; set; }
            public string ccusdefine15 { get; set; }
            public string ccusdefine16 { get; set; }
            public string icuscreline { get; set; }
            public string fstockquan { get; set; }
            public string fcanusequan { get; set; }
            public string cdefine1 { get; set; }
            public string cdefine2 { get; set; }
            public string cdefine3 { get; set; }
            public string cdefine4 { get; set; }
            public string cdefine5 { get; set; }
            public string cdefine6 { get; set; }
            public string cdefine7 { get; set; }
            public string cdefine8 { get; set; }
            public string cdefine9 { get; set; }
            public string cdefine10 { get; set; }
            public string cdefine11 { get; set; }
            public string cdefine12 { get; set; }
            public string cdefine13 { get; set; }
            public string cdefine14 { get; set; }
            public string cdefine15 { get; set; }
            public string ccreditcuscode { get; set; }
            public string ccreditcusname { get; set; }
            public string cgatheringplan { get; set; }
            public string cgatheringplanname { get; set; }
            public string ccushand { get; set; }
            public string cpsnophone { get; set; }
            public string cpsnmobilephone { get; set; }
            public string cattachment { get; set; }
            public string csscode { get; set; }
            public string cssname { get; set; }
            public string cinvoicecompany { get; set; }
            public string cinvoicecompanyabbname { get; set; }
            public string ccuspersoncode { get; set; }
            public string dclosedate { get; set; }
            public string dclosesystime { get; set; }
            public string bmustbook { get; set; }
            public string fbookratio { get; set; }
            public string cgathingcode { get; set; }
            public string fbooksum { get; set; }
            public string fbooknatsum { get; set; }
            public string fgbooknatsum { get; set; }
            public string fgbooksum { get; set; }
            public string ccrmpersonname { get; set; }
            public string csysbarcode { get; set; }
            public string ioppid { get; set; }
            public string contract_status { get; set; }
            public string csvouchtype { get; set; }
            public string bcashsale { get; set; }
            public string iflowid { get; set; }
            public string cflowname { get; set; }
            public string cchangeverifier { get; set; }
            public string dchangeverifydate { get; set; }
            public string dchangeverifytime { get; set; }
        }

        public class Body       //销售订单表体
        {
            public string isosid { get; set; }
            public string cinvname { get; set; }
            /// <summary>
            /// 存货编码
            /// </summary>
            public string cinvcode { get; set; }
            public string natoseqid { get; set; }
            public string natostatus { get; set; }
            public string iquoid { get; set; }
            public string autoid { get; set; }
            public string cscloser { get; set; }
            /// <summary>
            /// 行号
            /// </summary>
            public string irowno { get; set; }
            public string cconfigstatus { get; set; }
            public string ippartseqid { get; set; }
            public string cquocode { get; set; }
            public string cinvstd { get; set; }
            public string ccontractid { get; set; }
            public string ccontractrowguid { get; set; }
            public string ccontracttagcode { get; set; }
            public string icusbomid { get; set; }
            public string ippartqty { get; set; }
            public string ippartid { get; set; }
            public string imoquantity { get; set; }
            public string batomodel { get; set; }
            public decimal inum { get; set; }
            /// <summary>
            /// 数量
            /// </summary>
            public decimal iquantity { get; set; }
            public string fsalecost { get; set; }
            /// <summary>
            /// 原币单价（含税）
            /// </summary>
            public decimal itaxunitprice { get; set; }
            /// <summary>
            /// 报价
            /// </summary>
            public decimal iquotedprice { get; set; }
            /// <summary>
            /// 原币单价（无税）
            /// </summary>
            public decimal iunitprice { get; set; }
            /// <summary>
            /// 原币无税金额 
            /// </summary>
            public decimal imoney { get; set; }
            public decimal itax { get; set; }
            /// <summary>
            /// 原币价税合计
            /// </summary>
            public decimal isum { get; set; }
            public string fsaleprice { get; set; }
            public decimal inatunitprice { get; set; }
            public decimal inatmoney { get; set; }
            public decimal inattax { get; set; }
            /// <summary>
            /// 本币价税合计
            /// </summary>
            public decimal? inatsum { get; set; }
            public string inatdiscount { get; set; }
            public string idiscount { get; set; }
            public string ifhquantity { get; set; }
            public string ifhnum { get; set; }
            public string ifhmoney { get; set; }
            public string ikpquantity { get; set; }
            public string ikpnum { get; set; }
            public string ikpmoney { get; set; }
            public string iinvlscost { get; set; }
            public string cfree1 { get; set; }
            public string cfree2 { get; set; }
            public string dpredate { get; set; }
            public string dpremodate { get; set; }
            public string bservice { get; set; }
            public string bfree1 { get; set; }
            public string bfree2 { get; set; }
            public string bfree3 { get; set; }
            public string bfree4 { get; set; }
            public string bfree5 { get; set; }
            public string bfree6 { get; set; }
            public string bfree7 { get; set; }
            public string bfree8 { get; set; }
            public string bfree9 { get; set; }
            public string bfree10 { get; set; }
            /// <summary>
            /// 备注
            /// </summary>
            public string cmemo { get; set; }
            public string cinvdefine1 { get; set; }
            public string cinvdefine4 { get; set; }
            public string cinvdefine5 { get; set; }
            public string cinvdefine6 { get; set; }
            public string cinvdefine7 { get; set; }
            public string bsalepricefree1 { get; set; }
            public string bsalepricefree2 { get; set; }
            public string bsalepricefree3 { get; set; }
            public string bsalepricefree4 { get; set; }
            public string bsalepricefree5 { get; set; }
            public string bsalepricefree6 { get; set; }
            public string bsalepricefree7 { get; set; }
            public string bsalepricefree8 { get; set; }
            public string bsalepricefree9 { get; set; }
            public string bsalepricefree10 { get; set; }
            public string iaoids { get; set; }
            public string cpreordercode { get; set; }
            public string borderbom { get; set; }
            public string borderbomover { get; set; }
            public string idemandtype { get; set; }
            public string cdemandcode { get; set; }
            public string cdemandmemo { get; set; }
            public string cinvdefine8 { get; set; }
            public string cinvdefine9 { get; set; }
            public string cinvdefine10 { get; set; }
            public string cinvdefine11 { get; set; }
            public string cinvdefine12 { get; set; }
            public string cinvdefine13 { get; set; }
            public string cinvdefine14 { get; set; }
            public string cinvdefine15 { get; set; }
            public string cinvdefine16 { get; set; }
            public string cinvdefine2 { get; set; }
            public string cinvdefine3 { get; set; }
            public string binvtype { get; set; }
            public string cdefine22 { get; set; }
            public string cdefine23 { get; set; }
            public string cdefine24 { get; set; }
            public string cdefine25 { get; set; }
            public string cdefine26 { get; set; }
            public string cdefine27 { get; set; }
            /// <summary>
            /// 税率
            /// </summary>
            public decimal? itaxrate { get; set; }
            public string kl2 { get; set; }
            public string citemcode { get; set; }
            public string citem_class { get; set; }
            public string dkl1 { get; set; }
            public string dkl2 { get; set; }
            public string citemname { get; set; }
            public string citem_cname { get; set; }
            public string cfree3 { get; set; }
            public string cfree4 { get; set; }
            public string cfree5 { get; set; }
            public string cfree6 { get; set; }
            public string cfree7 { get; set; }
            public string cfree8 { get; set; }
            public string cfree9 { get; set; }
            public string cfree10 { get; set; }
            public string id { get; set; }
            public string iinvexchrate { get; set; }
            public string cunitid { get; set; }
            public string cinva_unit { get; set; }
            public string cinvm_unit { get; set; }
            public string igrouptype { get; set; }
            public string cgroupcode { get; set; }
            public string cdefine28 { get; set; }
            public string cdefine29 { get; set; }
            public string cdefine30 { get; set; }
            public string cdefine31 { get; set; }
            public string cdefine32 { get; set; }
            public string corufts { get; set; }
            public string cdefine33 { get; set; }
            public string cdefine34 { get; set; }
            public string cdefine35 { get; set; }
            public string cdefine36 { get; set; }
            public string cdefine37 { get; set; }
            public string binvmodel { get; set; }
            public string csrpolicy { get; set; }
            public string iprekeepquantity { get; set; }
            public string iprekeepnum { get; set; }
            public string iprekeeptotquantity { get; set; }
            public string iprekeeptotnum { get; set; }
            public string fcusminprice { get; set; }
            public string dreleasedate { get; set; }
            public string ccusinvcode { get; set; }
            public string ccusinvname { get; set; }
            public string cinvaddcode { get; set; }
            public string dbclosedate { get; set; }
            public string dbclosesystime { get; set; }
            public string kl { get; set; }
            public string editprop { get; set; }
            public string fstockquano { get; set; }
            public string fcanusequano { get; set; }
            public string iimid { get; set; }
            public string btracksalebill { get; set; }
            public string ccorvouchtype { get; set; }
            public string ccorvouchtypename { get; set; }
            public string icorrowno { get; set; }
            public string fcanusequan { get; set; }
            public string fstockquan { get; set; }
            public string bsaleprice { get; set; }
            public string bgift { get; set; }
            public string forecastdid { get; set; }
            public string cdetailsdemandcode { get; set; }
            public string cdetailsdemandmemo { get; set; }
            public string cbsysbarcode { get; set; }
            public string busecusbom { get; set; }
            public string bptomodel { get; set; }
            public string cparentcode { get; set; }
            public string cchildcode { get; set; }
            public string icalctype { get; set; }
            public string fchildqty { get; set; }
            public string fchildrate { get; set; }
            public string cfactorycode { get; set; }
            public string dufts { get; set; }
            public string cbdefine1 { get; set; }
            public string cbdefine2 { get; set; }
            public string cbdefine3 { get; set; }
            public string cbdefine4 { get; set; }
            public string cbdefine5 { get; set; }
            public string cbdefine6 { get; set; }
            public string cbdefine7 { get; set; }
            public string cbdefine8 { get; set; }
            public string cbdefine9 { get; set; }
            public string cbdefine10 { get; set; }
            public string cbdefine11 { get; set; }
            public string cbdefine12 { get; set; }
            public string cbdefine13 { get; set; }
            public string cbdefine14 { get; set; }
            public string cbdefine15 { get; set; }
            public string cbdefine16 { get; set; }
            public string cbdefine17 { get; set; }
            public string cbdefine18 { get; set; }
            public string cbdefine19 { get; set; }
            public string cbdefine20 { get; set; }
            public string cbdefine21 { get; set; }
            public string cbdefine22 { get; set; }
            public string cbdefine23 { get; set; }
            //材质
            public string cbdefine24 { get; set; }
        }


        //public class Head
        //{
        //    public string id { get; set; }
        //    /// <summary>
        //    /// 销售订单号 
        //    /// </summary>
        //    public string csocode { get; set; }
        //    public string cdefine1 { get; set; }
        //    /// <summary>
        //    /// 单据日期 
        //    /// </summary>
        //    public string ddate { get; set; }
        //    /// <summary>
        //    /// 客户编码
        //    /// </summary>
        //    public string ccuscode { get; set; }
        //    /// <summary>
        //    /// 客户名称
        //    /// </summary>
        //    public string ccusname { get; set; }
        //    /// <summary>
        //    /// 销售部门编码
        //    /// </summary>
        //    public string cdepcode { get; set; }
        //    /// <summary>
        //    /// 业务员编码
        //    /// </summary>
        //    public string cpersoncode { get; set; }
        //    /// <summary>
        //    /// 币种
        //    /// </summary>
        //    public string cexch_name { get; set; }
        //    /// <summary>
        //    /// 汇率
        //    /// </summary>
        //    public decimal iexchrate { get; set; }
        //    /// <summary>
        //    /// 制单人
        //    /// </summary>
        //    public string cmaker { get; set; }
        //    /// <summary>
        //    /// 审核日期
        //    /// </summary>
        //    public string dverifydate { get; set; }
        //    /// <summary>
        //    /// 审核人
        //    /// </summary>
        //    public string cverifier { get; set; }
        //    /// <summary>
        //    /// 备注
        //    /// </summary>
        //    public string cmemo { get; set; }
        //    /// <summary>
        //    /// 变更人
        //    /// </summary>
        //    public string cchanger { get; set; }

        //    public string cmodifier { get; set; }

        //    public string dmoddate { get; set; }

        //    public string ufts { get; set; }
        //    /// <summary>
        //    /// 销售类型
        //    /// </summary>
        //    public string cstcode { get; set; }
        //    /// <summary>
        //    /// 业务类型
        //    /// </summary>
        //    public string cbustype { get; set; }
        //}

    }

  



}
